package com.wangbo.box.prototype;

public class Prototype implements Cloneable{

    public Prototype() {
        System.out.println("Prototype 初始化");
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {
        System.out.println("clone invoke");
        return super.clone();
    }

    public static void main(String[] args) throws CloneNotSupportedException {
        Prototype prototype = new Prototype();
        Prototype clone = (Prototype) prototype.clone();
        System.out.println(prototype == clone);
    }
}
